<nav id="site-navigation" class="main-navigation" role="navigation">
    <div>
        <ul class="nav-menu">
            <li class="current-menu-item">
                <a href="/">首页</a>
            </li>

            {% load blog_tags %}

            {% if nav_pages %}
                {% for node in nav_pages %}
                    <li id="menu-item-{{ node.pk }}"
                        class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-{{ node.pk }}">
                        <a href="{{ node.get_absolute_url }}">{{ node.title }}</a>
                    </li>
                {% endfor %}
            {% endif %}

            {# blog.context_processors里定义了全局的nav_category_list所有分类列表，使用manager完成了 #}
            {# {% queryset_filter_tag nav_category_list parent_category=None as top_categorys %}#}

            {% for top_category in top_categorys %}
                {% include 'base/nav_node.html' %}
            {% endfor %}

            <li class="">
                <a href="{% url 'blog:guestbook' %}">留言板</a>
            </li>

            <li class="">
                <a href="{% url 'blog:archives' %}">文章归档</a>
            </li>
            {% if ENABLE_PHOTO %}
                <li>
                    <a href="{% url 'blog:photo' %}">相册</a>
                    <ul class="sub-menu">
                        <li><a href="{% url 'blog:photo2' %}">相册2</a></li>
                    </ul>
                </li>
            {% endif %}
        </ul>
    </div>
</nav><!-- #site-navigation -->